#exam6.1random.py 随机密码生成
#方法一:利用random库的序列随机生成8位密码
from random import *
'''
a = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'\
     'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',\
     1,2,3,4,5,6,7,8,9]
n = sample(a,8)
for i in n:
    print(i,end="")
'''
#方法二:
A = 'zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP123456789'
N = list(A)
T = 0
while T < 10:
    pwd = ""
    for i in range(8):
        pwd += N[randint(0,len(N)-1)]
    print("{}".format(pwd))
    T += 1

